package fr.kirin.logger.model;

import java.util.List;

import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeModel;

import fr.kirin.logger.filter.TreeFilter;


/**
 * 
 *Represent the logger tree model.
 *This model add special features which permits adding an item and filtering it. 
 * @author kirin
 *
 */
public interface LoggerTreeModel extends TreeModel, Sortable<DefaultMutableTreeNode> {

    /**Add an item to the logger model.
     * 
     * @param category item category. the category form is like cat1/cat2/cat3, the "/" is the default separator.
     * @param value item value.
     * @param comment comment on the item.
     * @param level item level.
     */
    public void addItem(String category, String value,String comment, Level level);
    /**Add an item to the logger model.
     * 
     * @param category item category. the category form is like cat1/cat2/cat3, the "/" is the default separator.
     * @param value item value.
     * @param level item level.
     */
    public void addItem(String category, String value,Level level);

    /**Add a filter to filtering nodes.
     * 
     * @param filter filter to add.
     */
    public void addFilter(TreeFilter filter);
    /**Add a filter to filtering nodes.
     * 
     * @param filter
     * @return true if the filter is removed successfully , false else.
     */
    public boolean removeFilter(TreeFilter filter);
    /**
     * 
     * @return all the filters.
     */
    public List<TreeFilter> getFilters();

}
